package com.bstek.bdf2.core.model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
 * @Title: 角色接口资源表
 * @Package: com.bstek.bdf2.core.model
 * @Description:
 * @Author: zxq
 * @Date: 2024/2/19 - 21:22
 */
@Entity
@Table(name = "BDF2_AUTH_API")
public class AuthApi implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "ID", length = 60, nullable = false)
//    @PropertyDef(label = "主键")
    private String id;

    @Column(name="ROLE_ID_",length=60)
    private String roleId;

    @Column(name = "PARENT_ID", length = 60)
//    @PropertyDef(label = "上级ID")
    private String parentId;

    @Column(name = "auth_Name", length = 120)
//    @PropertyDef(label = "模块名称")
    private String authName;

    @Column(name = "API_FEATURE", length = 120)
//    @PropertyDef(label = "功能")
    private String apiFeature;

    @Column(name = "API_NAME", length = 120)
//    @PropertyDef(label = "接口名")
    private String apiName;

    @Column(name = "API_CODE", length = 120)
// @PropertyDef(label = "api权限唯一标识")
    private String apiCode;

    @Column(name = "API_TYPE", length = 1)
//    @PropertyDef(label = "授权标记")//（0/1）
    private String apiType;

    @Column(name = "API_ORDER", length = 120)
//    @PropertyDef(label = "顺序")
    private Integer apiOrder;

    @Column(name = "CREATE_TIME")
//    @PropertyDef(label = "创建时间")
    private Date createTime;

    @Column(name = "CREATE_USER", length = 60)
//    @PropertyDef(label = "创建人")
    private String createUser;


    @Transient
    private List<AuthApi> children;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getAuthName() {
        return authName;
    }

    public void setAuthName(String authName) {
        this.authName = authName;
    }

    public String getApiFeature() {
        return apiFeature;
    }

    public void setApiFeature(String apiFeature) {
        this.apiFeature = apiFeature;
    }

    public String getApiName() {
        return apiName;
    }

    public void setApiName(String apiName) {
        this.apiName = apiName;
    }

    public String getApiCode() {
        return apiCode;
    }

    public void setApiCode(String apiCode) {
        this.apiCode = apiCode;
    }

    public String getApiType() {
        return apiType;
    }

    public void setApiType(String apiType) {
        this.apiType = apiType;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public List<AuthApi> getChildren() {
        return children;
    }

    public void setChildren(List<AuthApi> children) {
        this.children = children;
    }

    public Integer getApiOrder() {
        return apiOrder;
    }

    public void setApiOrder(Integer apiOrder) {
        this.apiOrder = apiOrder;
    }

    @Override
    public String toString() {
        return "AuthApi [id=" + id + ", roleId=" + roleId + ", parentId=" + parentId + ", authName=" + authName
                + ", apiFeature=" + apiFeature + ", apiName=" + apiName + ", apiCode=" + apiCode + ", apiType="
                + apiType + ", createTime=" + createTime + ", createUser=" + createUser + ", children=" + children
                + "]";
    }


}